import { request } from '@/utils/request';
import type { PaymentOrder } from '@/api/model/orderModel';
import {PageData} from '@/api/model/pageModel'

const Api = {
  Page: '/order/page',
  List: '/order/list',
  Detail:'/order/detail'
};

export function getList(pageInfo:any) {
return request.get<PageData<PaymentOrder>>({
        url: Api.Page+"?page="+pageInfo.current+"&pageSize="+pageInfo.pageSize+"&mchId="+pageInfo.mchId+"&date="+pageInfo.date,
      });
}

export function getPayOrder(type:number,count:number)
{
return request.get<Array<PaymentOrder>>({
        url: Api.List+"?type="+type+"&count="+count
      });
}
export function getOrderDetail(id:number)
{
return request.get<PaymentOrder>({
        url: Api.Detail+"?id="+id
      });
}